﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Glorysoft.EAP.Core.Entities.Odyssey
{
    [XmlRoot("TrackOut")]
    public class TrackOutRequest
    {
        [XmlElement("lotBaseInfo")]
        public lotBaseInfo lotBaseInfo = new lotBaseInfo();

        public parameterSet parameterSet = new parameterSet();
    }

    public class lotBaseInfo
    {
        /// <summary>
        /// 出站标识
        /// </summary>
        [XmlElement("trackFlag")]
        public string trackFlag { get; set; }

        /// <summary>
        /// 设备ID
        /// </summary>
        [XmlElement("equipmentId")]
        public string equipmentId { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        [XmlElement("lotId")]
        public string lotId { get; set; }
        /// <summary>
        /// 当前站点
        /// </summary>

        [XmlElement("operationId")]
        public string operationId { get; set; }
      
    }

    public class parameterSet
    {
        public string parameterSetRrn { get; set; }
        public string parameterSetSpecRrn { get; set; }
        public string parameterSetVersion { get; set; }
        public string parameterSize { get; set; }

        [XmlElement("parameters")]
        public List<parameters> parametersinfo = new List<parameters>();
    }

    public class parameters
    {
        public string parameterId { get; set; }
        public string parameterRrn { get; set; }
        public string parameterSequence { get; set; }
        public string samplePromptSize { get; set; }

        public List<samplePrompts> samplePrompts = new List<samplePrompts>();

    }

    public class samplePrompts
    {
        [XmlElement("position")]
        public string position { get; set; }



        public string readingPromptSize { get; set; }

        [JsonProperty("readingPrompts")]
        [XmlElement("readingPrompts")]
        List<readingPrompts> readingPrompts = new List<readingPrompts>();

        public string recipeId { get; set; }
        public string sampleId { get; set; }
        public string sampleRrn { get; set; }
        public string sampleSequence { get; set; }
        public string sampleValue { get; set; }


        [XmlElement("unitId")]
        public string unitId { get; set; }
        public string unitRrn { get; set; }

    }

    public class readingPrompts
    {


        [XmlElement("dataValue")]
        public string dataValue { get; set; }

        [XmlElement("readingId")]
        public string readingId { get; set; }
        [XmlElement("readingRrn")]
        public string readingRrn { get; set; }

        [XmlElement("readingSequence")]
        public string readingSequence { get; set; }
    }
}
